i2c: bcm2835: Can't support I2C_M_IGNORE_NAK
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 22 Sep 2016 20:05:50 +0000 (22:05 +0200)
committerpopcornmix <popcornmix@gmail.com>
Mon, 20 Feb 2017 20:28:40 +0000 (20:28 +0000)
commita528ab2dd2a65a75a2ce8566e30508dac3a1f41e
tree7ec665297ec3d90e5febe713ff17dfb81b75d798
parent53b30fee765cf8305a358930486060c438539243
i2c: bcm2835: Can't support I2C_M_IGNORE_NAK

The controller can't support this flag, so remove it.

Documentation/i2c/i2c-protocol states that all of the message is sent:

I2C_M_IGNORE_NAK:
    Normally message is interrupted immediately if there is [NA] from the
    client. Setting this flag treats any [NA] as [A], and all of
    message is sent.

From the BCM2835 ARM Peripherals datasheet:

    The ERR field is set when the slave fails to acknowledge either
    its address or a data byte written to it.

So when the controller doesn't receive an ack, it sets ERR and raises
an interrupt. In other words, the whole message is not sent.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
drivers/i2c/busses/i2c-bcm2835.c